let exp = module.exports = {};

exp.init = function (data) {
    //服务器发过来的数据初始化
    this.setProperties(data);
};

exp.setProperties = function (properties) {
    for (let key in properties) {
        if (properties.hasOwnProperty(key)) {
            this[key] = properties[key];
        }
    }
};